package util;

import java.math.BigDecimal;
import java.util.Date;

import javax.ws.rs.core.MediaType;

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;

public class NumericUtil {
	public static void main(String[] args) {
//		Float f = 0.1234687941614984616f;
//		System.out.println(String.valueOf(f));
//		System.out.println(new BigDecimal(String.valueOf(f)).toPlainString());
//		System.out.println(new BigDecimal(String.valueOf(f)).toEngineeringString());
//		System.out.println(new BigDecimal(String.valueOf(f)).toString());
//
//		System.out.println(f);
//		System.out.println(new BigDecimal(f).toPlainString());
//		System.out.println(new BigDecimal(f).toEngineeringString());
//		System.out.println(new BigDecimal(f).toString());
		
		WebHook wh = new WebHook();
		wh.setObject_id("a5dd1cd4f67b11e0934df23c91df44ef");
		wh.setSent(new Date());
		wh.setObject_refid("test_ref_173_promotion");
		ClientConfig cc = new DefaultClientConfig();
		cc.getClasses().add(String.class);
		Client c = Client.create(cc);
		c.resource("http://172.20.230.27:8081/tippr/webhook?apiKey=921fd1bab4c54497fabba30da82357dd").
		type(MediaType.APPLICATION_JSON_TYPE).
		post(String.class, wh);
	}
}
